"use strict";
const path = require("path");

function resolve(dir) {
  return path.join(__dirname, dir);
}
module.exports = {
  publicPath: "./", //后端要求的路径
  outputDir: "dist",
  assetsDir: "static",
  lintOnSave: process.env.NODE_ENV === "dev",
  productionSourceMap: false,
  devServer: {
    port: 8888,
    open: false,
    overlay: {
      warnings: false,
      errors: true,
    },
  },
  configureWebpack: {
    resolve: {
      alias: {
        "@": resolve("src"),
      },
    },
  },
  chainWebpack: (config) => {
    config.plugins.delete("preload");
    config.plugins.delete("prefetch");
  },
};
